package com.acknight.service.impl;

import com.acknight.dto.Result;
import com.acknight.entity.Notice;
import com.acknight.service.NoticeService;
import com.acknight.mapper.NoticeMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
* @author Administrator
* @description 针对表【tb_notice】的数据库操作Service实现
* @createDate 2024-04-23 09:38:01
*/
@Service
public class NoticeServiceImpl extends ServiceImpl<NoticeMapper, Notice> implements NoticeService{

    @Override
    public Result getNotice() {
        LambdaQueryWrapper<Notice> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Notice::getStatus, 1);
        Notice notice = getOne(queryWrapper);
        return Result.ok(notice);
    }
}
